package cn.yerly.sakura.repository;

import cn.yerly.sakura.domain.UserShopStar;
import org.springframework.data.jpa.repository.*;

import java.util.List;

/**
 * Spring Data JPA repository for the UserShopStar entity.
 */
public interface UserShopStarRepository extends JpaRepository<UserShopStar,Long> {

    @Query("select userShopStar from UserShopStar userShopStar where userShopStar.user.login = ?#{principal.username}")
    List<UserShopStar> findAllForCurrentUser();

}
